home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
226_01
/
manual.txt
< prev
next >
Wrap
Text File
|
1987-12-05
|
22KB
|
382 lines
ART-CEE
USER'S GUIDE
ART-CEE is a generic inference engine. It was written in MIX C on an
Apricot F1, a run-of-the-mill MS-DOS machine. The source and load modules
have been successfully compiled and executed on IBM XT, AT and clone machines
and should port easily to any MS-DOS machine. The source code also should
be fairly easy to convert to other C dialects.
Inference engines are a category of artificial intelligence programs.
Like traditional databases, they structure information for later retrieval.
But they also allow can guide the user through solving problems, point out
unnoticed connections within the data and suggest new possibilities. They
are capable of working with certainties as well as 'fuzzy' information
which is incomplete or tentative.
Information is entered into inferences engines as rules. In ART-CEE's
case, these rules are "If...then" propositions. Such rules should be closely
related and basic to the body of knowledge concerned; the quality of the
system built with the inference engine depends most on the accuracy and ade-
quacy of these rules. The user should enter enough rules to draw the major
connections between the data items, but there is no need to enter everything
that there is to know--after all, inference engines are designed to draw
their own inferences.
Information is retrieved from inference engines through queries. A query
is a question or a command which causes the inference engine to search the
database, extract the information it knows immediately and/or draw the
necessary inferences to come as close as possible to meeting the request, and
display both its conclusions and how it arrived at them. ART-CEE has three
kinds of queries that allow a broad range of services to you.
Each rule in ART-CEE is associated with a percentage of truth, occurrence
or certainty. If the rule is always true its percentage is 100; if it is
never true its percentage is 0. ART-CEE also uses this number of mark some
rules as logically impossible and to prevent the entering of tautologies.
These percentages are used to control the query process.
GETTING STARTED
Before you do anything, make a copy of all ART-CEE files, hide that
copy from neighbors, friends, angry spouses, magnetic fields, dust and
nuclear explosion.
ART-CEE is delivered as four source files. Compile each source file
individually. If you are using the MIX system, you may wish to optimize
WORKUP2.C for speed. Then link the four object files together and name the
output file ART-CEE.COM. The program will run faster if you link the runtime
functions with the WORKUP objects, but this will increase the size of the
final .COM file to above 60K.
If you find that ART-CEE's space requirements exceed what is available,
the amount of 'stack' and 'heap' used can be affected greatly by adjusting
the value of MAX in the header files. ART-CEE is supplied with a value of 60
for that variable. All source files use carry exactly the same value for MAX.
Locate the following files in the same directory on the default drive:
ART-CEE.COM, HELP1.AIH, HELP2.AIH, HELP3.AIH, HELP4.AIH. If you chose not to
link the MIX runtime functions with the WORKUP objects, the MIX C library
functions also must reside in that directory, unless a PATH command has been
executed. The runtime module also must have access to the MS-DOS i-o routines
on the system disk; screen blanking will not succeeed if these routines are
not available on the default drive or through a PATH command.
MAIN MENU AND PROMPT
The main input screen displays a menu of all available input options.
Commands and default settings may be addressed by entering the single
letter in the appropriate menu phrase. For instance, to load a data file,
enter "L". Usually the letter to be entered is the first letter in the
phrase, but in any case it is the only capitalized letter. Do not enter
the full word or phrase; ART-CEE will try to interpret that entry as a rule
or subject. ART-CEE will convert your inputs to all-capitals; the program
will execute more quickly if you enter them as capitals in the first place.
All inputs to ART-CEE must end in the "Return" or "Enter" key. Beginning with
version 1.4, inputs are processed without regard to case.
Rules and queries demand a more involved input. Any input at the main
prompt that is longer than one character will be treated as a rule or query.
RULES
All rules must begin with the word "IF " and contain the word " THEN ".
Between these words must be a subject, and after the " THEN " must be a
predicate (apologies to English teachers who know that such phrases are not
grammatical subjects and predicates). The entire rule cannot be longer than
eighty characters. Neither subject nor predicate should contain punctuation.
It follows that the rule should not end in punctuation (the reason for this is
that later matching against the predicate would have to include the same
punctuation, which probably would be incorrect for that usage and a mess to
remember). Any leading grammatical article ("A ", "AN " or "THE ") in sub-
ject or predicate will be ignored.
ART-CEE searches the database on each rule input to determine if it already
knows the subject or predicate. If it finds that the rule already exists, you
are given the opportunity to enter new percentages of occurrence for that rule.
Otherwise, if there is room in the database for the new rule, the rule is
added to the knowledge base. If override of default percentages is turned on,
you are asked to input forward and reverse percents. Otherwise the defaults
are used.
ART-CEE can handle up to MAX number of different subjects and/or predi-
cates. Internally, subjects and predicates are stored identically, as the
subject of one rule likely will be the predicate of another. The maximum
number of rules that can be handled is MAX * (MAX -1).
A forward percentage of occurrence refers to the percent of time that
the rule is true as entered. If fifty percent of all humans are female, then
the rule "IF HUMAN THEN FEMALE" would have a forward percentage of 50.00000
(trailing zeroes need not be entered). Reverse percentages refer to the
percent of time that the rule is true in reverse format. Using the example
above, if one percent of all females are human, the reverse percentage for
"IF HUMAN THEN FEMALE" would be 1.000000. Percentages must be not less than
zero (zero means "never true") and less than one hundred (one hundred means
"always true"). ART-CEE stores impossible rules with negative percentages
of occurrence, but you cannot enter them at rule entry time (see commands B
and G).
QUERIES
Three query formats are available in ART-CEE: simple query, two-element
query and thinking.
The simple query is a request for all rules concerning just one subject
in the database. It reports only those rules which contain the subject as
subject or predicate; no inferences are drawn. Only positive rules are
reported; if a potential rule has not been entered, or if the rule is marked
as impossible, it is not reported. Simple queries are entered by entering
any of the following phrases, followed by the subject: WHO, WHO IS, WHO IS A,
WHO IS AN, WHO IS THE, WHAT, WHAT IS, WHAT IS A, WHAT IS AN, WHAT IS THE,
DESCRIBE, DESCRIBE A, DESCRIBE AN, or DESCRIBE THE. The subject may be
followed by a question mark, which is ignored. ART-CEE searches the database
for an exact match on the subject. If the subject is found, all forward
rules for that subject are reported to the computer monitor, followed by all
reverse rules.
The two-element query asks is a certain rule is true. Using the above
example, to find out what percentage of all females are human, the input
would be: "IF FEMALE THEN HUMAN?" Note that the input is exactly like
the input for the entering of the rule, except that the rule ends in a ques-
tion mark. A